
const tool = require('./protoTool');
// const tool = require('./index');
console.log("tool==", tool)
const path = require('path');
const fs = require('fs');


const child_process = require('child_process');

 run1 = async function( ){
    // 安装公共处理模块
    // await spawnPromise('npm', ['install', 'protobufjs', '-g'], os.homedir());
    // // 处理指定的proto模块
    
    await tool.execPromise(`npm run build-proto:pbjs`);
    await tool.execPromise(`npm run build-proto:pbts`);
    await tool.execPromise(`node runrename.js `);
}
async function run(){
    await run1(); 
 
}

run();